<?php
	include 'csv2html.php';
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Google Drive tables to pure HTML demo</title>
    <link href="styles.css" rel="stylesheet" />
    <meta charset="utf-8">
</head>
<body>
	<h1>Google Drive tables to pure HTML demo</h1>
	<p>This PHP based demo shows how to embed simple Google Drive spreadsheets in an almost CMS like manner without all the extra dumb inline styles that are added when spreadsheets are exported to HTML.</p>
	<h2>Table</h2>
	<?php
		printTable('spreadsheet1');
	?>
	<h2>Original table</h2>
	<a href="https://docs.google.com/spreadsheet/ccc?key=0At-BhHxB4VqLdDFOZGpGVTZ1S3IteWVBNG9qQkxSMHc&usp=sharing">Edit table</a><br/>
	<iframe width='500' height='300' frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0At-BhHxB4VqLdDFOZGpGVTZ1S3IteWVBNG9qQkxSMHc&output=html&widget=true'></iframe>
	<p>h = merge cells horysontally</p>
	<p>v = merge cells vertically</p>
	<p><b>To see the changes first republish the document in google drive after editing (File=>Publish to the web=>Republish now).</b></p>
	<h2>Refresh local tables</h2>
	<form action="refresh.php" method="post">
		<input type="submit" value="Refresh">	
	</form>
	
</body>
</html>